package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@TableName("roles")
@Data
public class Role implements Serializable {
    @TableId(type = IdType.AUTO)
    private int id;
    private String roleCode;
    private String roleName;
    private String createBy;
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    @TableLogic
    private Integer deleted; //逻辑删除

    public Role(String roleCode, String roleName, String createBy) {
        this.roleCode = roleCode;
        this.roleName = roleName;
        this.createBy = createBy;
    }
}
